package com.ivo.model.hr;

import java.security.Principal;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "HR_O_Employee")
public class Employee implements Principal {
	@Id
	@Column(name = "ID")
	private String id;
	@Column(name = "Name")
	private String name;
	@Column(name = "Name_EN")
	private String name_EN;
	@Column(name = "Department_FK")
	private String department_FK;
	@Column(name = "Email")
	private String emailAddress;
	@Column(name = "Password")
	private String password;
	@Column(name = "Gender_FK")
	private String gender_FK;
	@Column(name = "VisibleFlag")
	private String visibleFlag;
	@Column(name = "ValidFlag")
	private short validFlag;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName_EN() {
		return name_EN;
	}

	public void setName_EN(String name_EN) {
		this.name_EN = name_EN;
	}

	public String getDepartment_FK() {
		return department_FK;
	}

	public void setDepartment_FK(String department_FK) {
		this.department_FK = department_FK;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getGender_FK() {
		return gender_FK;
	}

	public void setGender_FK(String gender_FK) {
		this.gender_FK = gender_FK;
	}

	public String getVisibleFlag() {
		return visibleFlag;
	}

	public void setVisibleFlag(String visibleFlag) {
		this.visibleFlag = visibleFlag;
	}

	public short getValidFlag() {
		return validFlag;
	}

	public void setValidFlag(short validFlag) {
		this.validFlag = validFlag;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Transient
	public String getName() {
		return this.name + " " + this.name_EN;
	}

	@Transient
	public String getName(String separator) {
		return this.name + separator + this.name_EN;
	}

}
